package com.shigen.demo.annation.valid;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import javax.validation.Constraint;
import javax.validation.Payload;

/**
 * ListValue参数校验注解
 *
 * @author shigenfu
 * @date 2022/6/16 9:46 下午
 */
@Documented
@Constraint(validatedBy = {ListValueConstraintValidator.class})
@Target({ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE, ElementType.CONSTRUCTOR, ElementType.PARAMETER, ElementType.TYPE_USE})
@Retention(RetentionPolicy.RUNTIME)
public @interface ListValue {

  String message() default "{com.shigen.demo.annation.valid.ListValue.message}";

  Class<?>[] groups() default {};

  Class<? extends Payload>[] payload() default {};

  int[] values() default {};
}
